import http from '../https'
const url = 'http://82.157.143.31:8080'
//全部数据查询
const home = (obj) => http({
    url: `${url}/drugCls/selectDrugCls`,
    method: 'get',
    params: {
        ...obj
    }
})
//删除
const del = (id) => http({
    url: `${url}/drugCls/deleteDrugCls`,
    method: 'post',
    data: {
        id
    }
})
//修改
const mod = (obj) => http({
    url: `${url}/drugCls/updateDrugCls`,
    method: 'post',
    data: { ...obj },
})
//父级增加
const add = (obj) => http({
    url: `${url}/drugCls/addFatherDrugCls`,
    method: 'post',
    data: { ...obj },
})
//子级增加
const addp = (obj) => http({
    url: `${url}/drugCls/addChildrenDrugCls`,
    method: 'post',
    data: { ...obj },
})
export {
    home,
    del,
    mod,
    add,
    addp
}